/* 移动端工具样式 */

/* 基础响应式类 */
.d-flex {
  display: flex !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-1 {
  flex: 1 !important;
}

.align-center {
  align-items: center !important;
}

.align-items-center {
  align-items: center !important;
}

.justify-center {
  justify-content: center !important;
}

.justify-between {
  justify-content: space-between !important;
}

.justify-content-center {
  justify-content: center !important;
}

.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

/* 边距类 */
.m-0 { margin: 0 !important; }
.m-1 { margin: 4px !important; }
.m-2 { margin: 8px !important; }
.m-3 { margin: 12px !important; }
.m-4 { margin: 16px !important; }
.m-5 { margin: 20px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-4 { margin-top: 16px !important; }
.mt-5 { margin-top: 20px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 20px !important; }

.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: 4px !important; }
.ml-2 { margin-left: 8px !important; }
.ml-3 { margin-left: 12px !important; }
.ml-4 { margin-left: 16px !important; }
.ml-5 { margin-left: 20px !important; }

.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: 4px !important; }
.mr-2 { margin-right: 8px !important; }
.mr-3 { margin-right: 12px !important; }
.mr-4 { margin-right: 16px !important; }
.mr-5 { margin-right: 20px !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 4px !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 12px !important; }
.p-4 { padding: 16px !important; }
.p-5 { padding: 20px !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 4px !important; }
.pt-2 { padding-top: 8px !important; }
.pt-3 { padding-top: 12px !important; }
.pt-4 { padding-top: 16px !important; }
.pt-5 { padding-top: 20px !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 4px !important; }
.pb-2 { padding-bottom: 8px !important; }
.pb-3 { padding-bottom: 12px !important; }
.pb-4 { padding-bottom: 16px !important; }
.pb-5 { padding-bottom: 20px !important; }

.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: 4px !important; }
.pl-2 { padding-left: 8px !important; }
.pl-3 { padding-left: 12px !important; }
.pl-4 { padding-left: 16px !important; }
.pl-5 { padding-left: 20px !important; }

.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: 4px !important; }
.pr-2 { padding-right: 8px !important; }
.pr-3 { padding-right: 12px !important; }
.pr-4 { padding-right: 16px !important; }
.pr-5 { padding-right: 20px !important; }

.px-1 { padding-left: 4px !important; padding-right: 4px !important; }
.px-2 { padding-left: 8px !important; padding-right: 8px !important; }
.px-3 { padding-left: 12px !important; padding-right: 12px !important; }
.px-4 { padding-left: 16px !important; padding-right: 16px !important; }
.px-5 { padding-left: 20px !important; padding-right: 20px !important; }

.py-1 { padding-top: 4px !important; padding-bottom: 4px !important; }
.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-3 { padding-top: 12px !important; padding-bottom: 12px !important; }
.py-4 { padding-top: 16px !important; padding-bottom: 16px !important; }
.py-5 { padding-top: 20px !important; padding-bottom: 20px !important; }

/* 宽度和高度 */
.w-full { width: 100% !important; }
.w-auto { width: auto !important; }
.h-full { height: 100% !important; }
.h-auto { height: auto !important; }

/* 位置 */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }

/* 文本样式 */
.font-bold { font-weight: bold !important; }
.font-semibold { font-weight: 600 !important; }
.font-normal { font-weight: normal !important; }

.text-sm { font-size: 12px !important; }
.text-base { font-size: 14px !important; }
.text-lg { font-size: 16px !important; }
.text-xl { font-size: 18px !important; }
.text-2xl { font-size: 20px !important; }

/* 边框 */
.border { border: 1px solid var(--el-border-color) !important; }
.border-0 { border: none !important; }
.border-t { border-top: 1px solid var(--el-border-color) !important; }
.border-b { border-bottom: 1px solid var(--el-border-color) !important; }
.border-l { border-left: 1px solid var(--el-border-color) !important; }
.border-r { border-right: 1px solid var(--el-border-color) !important; }

.rounded { border-radius: 4px !important; }
.rounded-md { border-radius: 6px !important; }
.rounded-lg { border-radius: 8px !important; }
.rounded-full { border-radius: 50% !important; }

/* 阴影 */
.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important; }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important; }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1) !important; }

/* 显示/隐藏 */
.hidden { display: none !important; }
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

/* 溢出 */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }

.truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* 光标 */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }

/* 移动端特定响应式 */
@media (max-width: 768px) {
  .mobile-hidden { display: none !important; }
  .mobile-block { display: block !important; }
  .mobile-flex { display: flex !important; }
  .mobile-grid { display: grid !important; }
  
  .mobile-text-center { text-align: center !important; }
  .mobile-text-left { text-align: left !important; }
  
  .mobile-w-full { width: 100% !important; }
  .mobile-h-auto { height: auto !important; }
  
  .mobile-p-2 { padding: 8px !important; }
  .mobile-p-3 { padding: 12px !important; }
  .mobile-p-4 { padding: 16px !important; }
  
  .mobile-m-2 { margin: 8px !important; }
  .mobile-m-3 { margin: 12px !important; }
  .mobile-m-4 { margin: 16px !important; }
}

/* 触摸友好的按钮 */
@media (max-width: 768px) {
  .touch-target {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  .mobile-button {
    padding: 12px 16px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
  }
}

/* 移动端安全区域 */
@supports (padding: max(0px)) {
  .safe-area-inset-top {
    padding-top: max(8px, env(safe-area-inset-top)) !important;
  }
  
  .safe-area-inset-bottom {
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }
  
  .safe-area-inset-left {
    padding-left: max(8px, env(safe-area-inset-left)) !important;
  }
  
  .safe-area-inset-right {
    padding-right: max(8px, env(safe-area-inset-right)) !important;
  }
}

/* acCoderSaas 特有的团队切换移动端样式 */
.acsaas-mobile-team-selector {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.acsaas-team-option {
  padding: 12px 16px;
  border-bottom: 1px solid var(--el-border-color-lighter);
  transition: all 0.2s ease;
}

.acsaas-team-option:last-child {
  border-bottom: none;
}

.acsaas-team-option:hover {
  background-color: var(--el-color-primary-light-9);
}

.acsaas-team-option.active {
  background-color: var(--el-color-primary-light-8);
  color: var(--el-color-primary);
  font-weight: 600;
}

/* 移动端专用的团队管理按钮 */
.acsaas-mobile-mgmt-btn {
  background: linear-gradient(135deg, var(--el-color-primary) 0%, var(--el-color-primary-dark-2) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.acsaas-mobile-mgmt-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.acsaas-mobile-mgmt-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* acCoderSaas 移动端弹窗优化 */
.acsaas-mobile-dialog {
  border-radius: 0 !important;
  margin: 0 !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

.acsaas-mobile-dialog-header {
  background: linear-gradient(135deg, var(--el-color-primary-light-9) 0%, #fff 100%);
  border-bottom: 1px solid var(--el-border-color-light);
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.acsaas-mobile-form {
  padding: 20px 16px;
}

.acsaas-mobile-form-item {
  margin-bottom: 20px !important;
}

.acsaas-mobile-input {
  height: 48px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
}

.acsaas-mobile-button {
  width: 100% !important;
  height: 48px !important;
  font-size: 16px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  margin-bottom: 12px !important;
}

/* 团队选择器特殊样式 */
.acsaas-team-drawer {
  border-radius: 20px 20px 0 0 !important;
  max-height: 80vh !important;
}

.acsaas-team-item-active {
  background: var(--el-color-primary-light-8) !important;
  border-left: 4px solid var(--el-color-primary) !important;
  color: var(--el-color-primary) !important;
}

/* 触摸友好的团队切换 */
.mobile-team-selector-btn {
  min-height: 44px !important;
  min-width: 44px !important;
  border-radius: 50% !important;
  background: var(--el-color-primary-light-9) !important;
  color: var(--el-color-primary) !important;
}

/* 移动端导航通用样式 */
.mobile-nav {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-nav-header {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-logo {
  display: flex;
  align-items: center;
}

.mobile-logo img {
  height: 45px;
  margin-right: 8px;
}

.mobile-team-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--el-text-color-primary);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 移动端菜单抽屉通用样式 */
.mobile-menu-drawer :deep(.el-drawer__body) {
  padding: 0;
  background: #fff;
}

.mobile-menu-content {
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.mobile-user-section {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--el-color-primary-light-9) 0%, #fff 100%);
  border-bottom: 1px solid var(--el-border-color-light);
}

.mobile-user-info {
  flex: 1;
}

.mobile-user-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--el-text-color-primary);
}

.mobile-team-section {
  padding: 12px 20px;
  border-bottom: 1px solid var(--el-border-color-light);
  background: linear-gradient(135deg, var(--el-color-primary-light-9) 0%, #fff 100%);
}

.mobile-current-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--el-text-color-regular);
}

.mobile-current-team.clickable {
  color: var(--el-color-primary);
  cursor: pointer;
  transition: all 0.2s;
  padding: 8px 12px;
  border-radius: 6px;
  margin: -8px -12px;
}

.mobile-current-team.clickable:hover {
  background: var(--el-color-primary-light-8);
  color: var(--el-color-primary-dark-2);
}

.mobile-team-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.mobile-team-name-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.mobile-team-switch-icon {
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.mobile-current-team.clickable:hover .mobile-team-switch-icon {
  transform: translateX(2px);
}

.mobile-nav-menu {
  flex: 1;
  padding: 8px 0;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--el-text-color-primary);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  cursor: pointer;
}

.mobile-nav-item:hover,
.mobile-nav-item.router-link-active {
  background: var(--el-color-primary-light-9);
  border-left-color: var(--el-color-primary);
  color: var(--el-color-primary);
}

.mobile-user-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--el-border-color-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
}

.mobile-action-item:hover {
  background: var(--el-color-primary-light-9);
}

.mobile-action-item.danger {
  color: var(--el-color-danger);
}

.mobile-action-item.danger:hover {
  background: var(--el-color-danger-light-9);
}

.mobile-action-item el-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* 移动端弹窗通用样式 */
.mobile-dialog-compact :deep(.el-dialog) {
  border-radius: 12px !important;
  max-height: 60vh !important;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.mobile-dialog-compact :deep(.el-dialog__body) {
  padding: 0 !important;
  max-height: calc(60vh - 60px);
  overflow: hidden;
}

.mobile-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--el-color-primary) 0%, var(--el-color-primary-light-3) 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.mobile-dialog-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}

.mobile-dialog-title-icon {
  font-size: 18px;
}

.mobile-dialog-close-btn {
  color: white !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
}

.mobile-dialog-close-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* 移动端团队选择器样式 */
.mobile-team-selection {
  display: flex;
  flex-direction: column;
  background: #fff;
  max-height: calc(60vh - 60px);
}

.mobile-team-search {
  padding: 16px 16px 8px;
  border-bottom: 1px solid var(--el-border-color-lighter);
}

.mobile-team-search :deep(.el-input__wrapper) {
  border-radius: 20px;
  border: 1px solid var(--el-border-color);
  min-height: 36px;
}

.mobile-team-search :deep(.el-input__inner) {
  font-size: 14px;
}

.mobile-team-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 12px;
  max-height: calc(60vh - 140px);
  -webkit-overflow-scrolling: touch;
}

.mobile-team-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 6px;
  border-radius: 8px;
  border: 1px solid var(--el-border-color-lighter);
  background: #fff;
  transition: all 0.2s ease;
  min-height: 60px;
}

.mobile-team-item:last-child {
  margin-bottom: 0;
}

.mobile-team-item.active {
  border-color: var(--el-color-success);
  background: linear-gradient(135deg, var(--el-color-success-light-9) 0%, #fff 100%);
  cursor: default;
}

.mobile-team-item.clickable {
  cursor: pointer;
}

.mobile-team-item.clickable:hover {
  border-color: var(--el-color-primary);
  background: var(--el-color-primary-light-9);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-team-item:active {
  transform: scale(0.98);
}

.mobile-team-item-main {
  flex: 1;
  min-width: 0;
}

.mobile-team-item-name {
  font-size: 15px;
  color: var(--el-text-color-primary);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-team-item-id {
  font-size: 12px;
  color: var(--el-text-color-secondary);
  line-height: 1.2;
}

.mobile-team-item-status {
  display: flex;
  align-items: center;
  margin-left: 12px;
}

.mobile-current-icon {
  font-size: 20px;
  color: var(--el-color-success);
}

.mobile-switch-icon {
  font-size: 18px;
  color: var(--el-color-primary);
  transition: transform 0.2s;
}

.mobile-team-item.clickable:hover .mobile-switch-icon {
  transform: translateX(3px);
}

.mobile-no-teams {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  color: var(--el-text-color-secondary);
  min-height: 120px;
}

.mobile-no-teams-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.mobile-no-teams-text {
  font-size: 14px;
  font-weight: 500;
}

/* =================================== */
/* Footer 组件公用样式 */
/* 用于 LoginFooter.vue 和 HomeFooter.vue */
/* =================================== */

/* 底部容器基础样式 */
.footer-base {
  color: rgba(255, 255, 255, 0.9);
  z-index: 3;
  flex-shrink: 0;
}

.footer-content-base {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* 标题组样式 */
.footer-title-group {
  margin-bottom: 10px;
  border-bottom: 1px solid var(--sass-color-blue-light);
}

.footer-main-title {
  font-size: 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.footer-main-title .icon {
  font-size: 24px;
  margin-right: 12px;
  color: var(--sass-color-blue-light);
}

.footer-sub-title {
  font-size: 15px;
  display: flex;
  align-items: center;
  line-height: 22.5px;
}

.footer-sub-title .icon {
  font-size: 22px;
  margin-right: 12px;
  color: var(--sass-color-blue-light);
}

/* 联系信息样式 */
.footer-contact-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 10px;
}

.footer-contact-column {
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  padding-left: 24px;
}

.footer-contact-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.footer-contact-item:last-child {
  border-bottom: none;
}

.footer-campus {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.footer-tel {
  color: var(--sass-color-blue-light) !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.footer-tel:hover {
  color: var(--sass-color-blue) !important;
}

/* 底部信息样式 */
.footer-bottom-base {
  text-align: center;
  padding: 4px 0;
}

.footer-icp {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* 移动端 Footer 响应式样式 - 768px */
@media (max-width: 768px) {
  .footer-base {
    padding: 8px 0;
  }

  .footer-content-base {
    padding: 0 12px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .footer-title-group {
    margin-bottom: 4px;
    padding-bottom: 4px;
  }

  .footer-main-title {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .footer-sub-title {
    font-size: 12px;
    line-height: 16px;
  }

  .footer-contact-sections {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 4px;
  }

  .footer-contact-column {
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
  }

  .footer-contact-item {
    flex-direction: row;
    justify-content: space-between;
    padding: 6px 0;
    gap: 4px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    overflow: hidden;
  }

  .footer-campus {
    font-size: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .footer-tel {
    font-size: 10px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .footer-bottom-base {
    padding-bottom: 4px;
  }

  .footer-icp {
    font-size: 11px;
  }
}

/* 移动端 Footer 响应式样式 - 480px */
@media (max-width: 480px) {
  .footer-base {
    padding: 6px 0;
  }

  .footer-content-base {
    padding: 0 8px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .footer-title-group {
    margin-bottom: 3px;
    padding-bottom: 3px;
  }

  .footer-main-title {
    font-size: 13px;
    margin-bottom: 1px;
  }

  .footer-sub-title {
    font-size: 11px;
    line-height: 14px;
  }

  .footer-contact-sections {
    gap: 4px;
    margin-bottom: 3px;
  }

  .footer-contact-column {
    padding-left: 4px;
  }

  .footer-contact-item {
    padding: 4px 0;
    gap: 3px;
  }

  .footer-campus {
    font-size: 9px;
  }

  .footer-tel {
    font-size: 9px;
  }

  .footer-bottom-base {
    padding-bottom: 3px;
  }

  .footer-icp {
    font-size: 10px;
  }
}

/* HomeFooter 特有样式 (无背景，有边框) */
.home-footer-wrapper {
  background: var(--el-bg-color);
  border-top: 1px solid var(--el-border-color-light);
  margin-bottom: 0 !important;
}

/* HomeFooter 移动端特有样式 */
@media (max-width: 768px) {
  .home-footer-content {
    margin: 0;
    padding: 8px 12px;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .home-footer-content {
    margin: 0;
    padding: 6px 8px;
  }
}

/* 响应式控制 */
@media (max-width: 768px) {
  .mobile-show {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .mobile-hide {
    display: none !important;
  }
}